home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / fbutton.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.3 KB  |  65 lines

  1. #ifndef CLASS_FBUTTON_H
  2. #define CLASS_FBUTTON_H
  3.  
  4. #ifndef EXEC_TYPES_H
  5. #include <exec/types.h>
  6. #endif
  7.  
  8. #ifndef INTUITION_INTUITION_H
  9. struct Image ;
  10. struct IntuiText ;
  11. #endif
  12.  
  13. #ifndef GRAPHICS_TEXT_H
  14. struct TTextAttr ;
  15. struct TextFont ;
  16. #endif
  17.  
  18. #ifndef CLASS_WINDOW_H
  19. class window ;
  20. #endif
  21.  
  22. #ifndef CLASS_GADGETLIST_H
  23. class gadgetlist ;
  24. #endif
  25.  
  26. #ifndef CLASS_GADGET_H
  27. #include "gadgets/gadget.h"
  28. #endif
  29.  
  30. #ifndef CLASS_SLIST_H
  31. class slist ;
  32. class slink ;
  33. #endif
  34.  
  35. // ========================================================================
  36. // ==========================  FBUTTON CLASS ==============================
  37. // ========================================================================
  38.  
  39. class fbutton : public gadget
  40. {
  41.     STRPTR      text ;
  42.     STRPTR      norm1 ;
  43.     STRPTR      norm2 ;
  44.     STRPTR      under ;
  45.  
  46.     IntuiText   *it1 ;
  47.     IntuiText   *it2 ;
  48.     IntuiText   *it3 ;
  49.  
  50.     TextFont    *font ;
  51.     TTextAttr   *underline ;
  52. public:
  53.     fbutton(gadgetlist *gl,
  54.            void (window::*func)(gadget *, unsigned long, unsigned short),
  55.            const char *t, BOOL def=FALSE, BOOL disable=FALSE) ;
  56.     ~fbutton() ;
  57.     void select(BOOL sel, BOOL disable=FALSE) ;
  58.     void keystroke(BOOL shifted) ;
  59.     void action(unsigned long classe, unsigned short code) ;
  60.     void initlab(const char *t) ;
  61.     void freelab() ;
  62.     void set(const char *text) ;
  63. };
  64. #endif
  65.